include_directories(${NETZEN_SOURCE_DIR}/src)
link_directories(${NETZEN_BINARY_DIR}/src)

INCLUDE_DIRECTORIES("./" "./Eigen" ../ ${QT_INCLUDE_DIR} ${PNG_INCLUDE_DIR} ${GLEW_INCLUDE_PATH} )
if(Boost_FOUND)
	set(BOOST_SOURCES tools/closeness.cpp tools/betweenness.cpp tools/eigenvector_centrality2.cpp tools/markov_centrality2.cpp)
	MESSAGE(STATUS "Using Boost. Include : ${Boost_INCLUDE_DIRS}")
	MESSAGE(STATUS "Adding Boost related sources: ${BOOST_SOURCES}")
endif()
if(PNG_FOUND AND GLEW_FOUND)
	set(SCREEN_SOURCES tools/screenShotTool.cpp)
	MESSAGE(STATUS "PNG and GLEW found. Adding Screenshot capabilities")
endif()

MESSAGE(STATUS "Compiling with BOOST sources : ${BOOST_SOURCES}")
SET(netzen_MOC_HDRS
           ui/propertyInspectorDelegate.h
           ui/qMappingEditor.h
           ui/qNRender.h
           ui/qNWindow.h
           ui/qShortcutBar.h
           ui/tabbar.h
	   ui/qDataEditor.h
)

QT4_WRAP_CPP(netzen_MOC_SRCS ${netzen_MOC_HDRS})

add_executable(netzen 
	${netzen_MOC_SRCS}
           clickable.cpp 
           analysisTool.cpp 
           cluster.cpp 
           colormap.cpp 
           controller.cpp 
           dataControl.cpp 
           edge.cpp 
           graph.cpp 
           layout.cpp 
           main.cpp 
           node.cpp 
	   propertyUtils.cpp
           propertyBag.cpp 
           renderUtils.cpp 
           shortcut.cpp 
           statManager.cpp 
           view.cpp 
           viewManager.cpp 
           layouts/fdlayout.cpp 
           layouts/propertyLayout.cpp 
           layouts/linloglayout.cpp 
           tools/dataTools.cpp 
           tools/filter.cpp 
           tools/mst.cpp 
           tools/sensitivity.cpp 
	   tools/clusteringCoefficient.cpp
           views/histograms.cpp
           views/matrixView.cpp 
           views/parallel.cpp 
           views/simpleGraphView.cpp 
           views/graphView.cpp 
           views/scatterplot.cpp 
           views/colorEditor.cpp 
           views/edgeCorrelation.cpp 
           views/sensitivityView.cpp 
           views/discreteLegend.cpp 
           ui/borderlayout.cpp 
           ui/propertyInspectorDelegate.cpp 
           ui/qMappingEditor.cpp 
           ui/qNRender.cpp 
           ui/qNWindow.cpp 
           ui/qShortcutBar.cpp 
           ui/tabbar.cpp 
           ui/uiUtils.cpp 
	   ui/qDataEditor.cpp 
           shortcuts/shortcutScatterplot.cpp
           shortcuts/shortcutParallel.cpp
           shortcuts/shortcutGraph.cpp
           shortcuts/shortcutScatterplotMatrix.cpp
           shortcuts/shortcutHistogram.cpp
           shortcuts/canvasShortcuts.cpp
           extra/monopoly.cpp 
	${BOOST_SOURCES}
	${SCREEN_SOURCES}
)

IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
   # Mac OS X specific code
   SET(OperatingSystem "Mac OS X")
   add_definitions(-DMAC_OSX)
   #set_target_properties(netzen PROPERTIES COMPILE_DEFINITIONS "MAC_OSX=1")
   MESSAGE(STATUS "Compiling for Mac OS X")
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") 
if(PNG_FOUND)
	add_definitions(-DUSING_LIBPNG)
endif()
target_link_libraries(netzen m ${Boost_LIBRARIES} ${OPENGL_LIBRARIES} ${PNG_LIBRARY} ${GLEW_LIBRARY})  
target_link_libraries(netzen ${QT_LIBRARIES})

